package com.qboot.common.consts;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * 响应结果消息常量
 *
 * @author Tellsea
 * @date 2022/11/21
 */
@Getter
@AllArgsConstructor
public enum MsgConst {

    QUERY_SUCCESS(HttpStatus.OK.value(), "查询成功"),
    QUERY_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "查询失败"),
    SAVE_SUCCESS(HttpStatus.OK.value(), "新增成功"),
    SAVE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "新增失败"),
    UPDATE_SUCCESS(HttpStatus.OK.value(), "更新成功"),
    UPDATE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "更新失败"),
    REMOVE_SUCCESS(HttpStatus.OK.value(), "删除成功"),
    REMOVE_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "删除失败"),
    IMPORT_SUCCESS(HttpStatus.OK.value(), "导入成功"),
    IMPORT_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "导入失败"),
    EXPORT_SUCCESS(HttpStatus.OK.value(), "导出成功"),
    EXPORT_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "导出失败"),
    UPLOAD_SUCCESS(HttpStatus.OK.value(), "上传成功"),
    UPLOAD_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "上传失败");

    private int code;

    private String msg;
}
